<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

  <xi:include href="master.html" />

<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
  <title>List Event Types</title>
</head>

<body>
<div class="grid_12">
    ${sidebar_left()}
    <div class="grid_9 omega">
                    ${tmpl_context.event_type_form(action='/eventtype/update',value=dict(event_type_id=1,event_type='oooooo'))}
        <div class="grid_9" py:for="et in etypes">
            <div class="grid_9">
                <div class="grid_1 alpha"><a href="#" class="toggle_edit" id="${et.event_type_id}">Edit</a></div>
                <div class="grid_3">${et.type}</div>
                <div class="grid_5 omega">${et.description}</div><br/>
                <div class="hidden_edit" id="hidden_${et.event_type_id}">
                    <a href="#" onClick="closeEditDiv('hidden_${et.event_type_id}')">Close</a>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
function boom(data) {
    var as_json = JSON.parse(data);
    alert(data);
}
function closeEditDiv(div_id) {
    $('#'+div_id).fadeOut(300);
}
$(document).ready(function() {
    $('.hidden_edit').hide();
    $('.toggle_edit').live('click',function(){
        var requested_id = 'hidden_'+$(this).attr('id');
        $('#'+requested_id).fadeIn(350);
    });
});
/*]]>*/
</script>
</body>
</html>
